//
//  UIViewController+HUD.swift
//  XHWalletUtils
//
//  Created by xinph on 2020/5/12.
//  Copyright © 2020 xinph. All rights reserved.
//

import MBProgressHUD
import UIKit

/// 提示框协议
protocol MEEProgressHUDProtocol {
    var showAtView: UIView { get }
}

extension MEEProgressHUDProtocol {

    func showHUD() {
        MBProgressHUD.showAdded(to: showAtView, animated: true)
    }

    func hideHUD() {
        MBProgressHUD.hide(for: showAtView, animated: true)
    }

}

extension UIViewController: MEEProgressHUDProtocol {
    var showAtView: UIView {
        return view
    }
}
